3.50 \(\int \sqrt{a \sec ^2(x)} \, dx\)

Optimal. Leaf size=25 \[ \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right ) \]

[Out]

Sqrt[a]*ArcTanh[(Sqrt[a]*Tan[x])/Sqrt[a*Sec[x]^2]]

________________________________________________________________________________________

Rubi [A]  time = 0.0148376, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {4122, 217, 206} \[ \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[Sqrt[a*Sec[x]^2],x]

[Out]

Sqrt[a]*ArcTanh[(Sqrt[a]*Tan[x])/Sqrt[a*Sec[x]^2]]

Rule 4122

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(b*ff)
/f, Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \sqrt{a \sec ^2(x)} \, dx &=a \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+a x^2}} \, dx,x,\tan (x)\right )\\ &=a \operatorname{Subst}\left (\int \frac{1}{1-a x^2} \, dx,x,\frac{\tan (x)}{\sqrt{a \sec ^2(x)}}\right )\\ &=\sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \tan (x)}{\sqrt{a \sec ^2(x)}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0078522, size = 46, normalized size = 1.84 \[ \cos (x) \sqrt{a \sec ^2(x)} \left (\log \left (\sin \left (\frac{x}{2}\right )+\cos \left (\frac{x}{2}\right )\right )-\log \left (\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a*Sec[x]^2],x]

[Out]

Cos[x]*(-Log[Cos[x/2] - Sin[x/2]] + Log[Cos[x/2] + Sin[x/2]])*Sqrt[a*Sec[x]^2]

________________________________________________________________________________________

Maple [A]  time = 0.056, size = 23, normalized size = 0.9 \begin{align*} -2\,\cos \left ( x \right ){\it Artanh} \left ({\frac{-1+\cos \left ( x \right ) }{\sin \left ( x \right ) }} \right ) \sqrt{{\frac{a}{ \left ( \cos \left ( x \right ) \right ) ^{2}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*sec(x)^2)^(1/2),x)

[Out]

-2*cos(x)*arctanh((-1+cos(x))/sin(x))*(a/cos(x)^2)^(1/2)

________________________________________________________________________________________

Maxima [A]  time = 1.93595, size = 51, normalized size = 2.04 \begin{align*} \frac{1}{2} \, \sqrt{a}{\left (\log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="maxima")

[Out]

1/2*sqrt(a)*(log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) - log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1))

________________________________________________________________________________________

Fricas [A]  time = 1.46416, size = 171, normalized size = 6.84 \begin{align*} \left [-\frac{1}{2} \, \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ) \log \left (-\frac{\sin \left (x\right ) - 1}{\sin \left (x\right ) + 1}\right ), -\sqrt{-a} \arctan \left (\frac{\sqrt{-a} \sqrt{\frac{a}{\cos \left (x\right )^{2}}} \cos \left (x\right ) \sin \left (x\right )}{a}\right )\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="fricas")

[Out]

[-1/2*sqrt(a/cos(x)^2)*cos(x)*log(-(sin(x) - 1)/(sin(x) + 1)), -sqrt(-a)*arctan(sqrt(-a)*sqrt(a/cos(x)^2)*cos(
x)*sin(x)/a)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \sec ^{2}{\left (x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)**2)**(1/2),x)

[Out]

Integral(sqrt(a*sec(x)**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.34264, size = 42, normalized size = 1.68 \begin{align*} \frac{1}{4} \, \sqrt{a}{\left (\log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) + 2 \right |}\right ) - \log \left ({\left | \frac{1}{\sin \left (x\right )} + \sin \left (x\right ) - 2 \right |}\right )\right )} \mathrm{sgn}\left (\cos \left (x\right )\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*sec(x)^2)^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(a)*(log(abs(1/sin(x) + sin(x) + 2)) - log(abs(1/sin(x) + sin(x) - 2)))*sgn(cos(x))